Matthias Clasen [Sat, 2 Apr 2011 02:02:38 +0000 (22:02 -0400)]
Fix some refcounting issues in the print dialog
gtk_tree_model_get returns a reference for objects, but the
printers in the model can be NULL,
https://bugzilla.gnome.org/show_bug.cgi?id=646446
Federico Mena Quintero [Fri, 1 Apr 2011 22:16:17 +0000 (16:16 -0600)]
[filechooser] Free things which got duplicated or reffed by gtk_tree_model_get()
We had forgotten to do that in a few places; this is a systematic search for those.
https://bugzilla.gnome.org/show_bug.cgi?id=646461
Federico Mena Quintero [Fri, 1 Apr 2011 22:06:51 +0000 (16:06 -0600)]
[filechooser] Unref cancellables we got from the model, not the ones that come into the callback
The model_cancellables have an extra ref when we get them from gtk_tree_model_get().
So, we need to unref them always. On the other hand, the cancellables that get
passed as arguments to the callbacks in question are memory-managed by
GtkFileSystemModel.
Reported by Morten Welinder <mortenw@gnome.org>
https://bugzilla.gnome.org/show_bug.cgi?id=646460
Federico Mena Quintero [Fri, 1 Apr 2011 19:25:24 +0000 (13:25 -0600)]
[filechooser] Don't leak a GFile
Reported by Morten Welinder <mortenw@gnome.org>
https://bugzilla.gnome.org/show_bug.cgi?id=646458
Federico Mena Quintero [Fri, 1 Apr 2011 18:44:10 +0000 (12:44 -0600)]
[filechooser] Don't add extra ref to file, as it it comes from gtk_tree_model_get()
Leak kindly reported by leak finder extraordinaire Morten Welinder <mortenw@gnome.org>
https://bugzilla.gnome.org/show_bug.cgi?id=646457
Juan Pablo Ugarte [Fri, 1 Apr 2011 22:35:32 +0000 (19:35 -0300)]
Added GtkEntry:completion property
Gabor Kelemen [Fri, 1 Apr 2011 13:12:56 +0000 (15:12 +0200)]
Updated Hungarian translation
Gabor Kelemen [Fri, 1 Apr 2011 13:16:57 +0000 (15:16 +0200)]
Updated Hungarian translation
Gabriel F. Vilar [Fri, 1 Apr 2011 12:11:15 +0000 (09:11 -0300)]
Updated Brazilian Portuguese translation
Rajesh Ranjan [Fri, 1 Apr 2011 09:26:12 +0000 (14:56 +0530)]
hindi updated
Rajesh Ranjan [Fri, 1 Apr 2011 09:24:43 +0000 (14:54 +0530)]
hindi updated
Matthias Clasen [Thu, 31 Mar 2011 23:59:00 +0000 (19:59 -0400)]
Call _exit instead of exit from X error handlers
This is because running atexit() handlers from there is
usually bad news.
https://bugzilla.gnome.org/show_bug.cgi?id=646338
Juan Pablo Ugarte [Thu, 31 Mar 2011 22:03:52 +0000 (19:03 -0300)]
* gtk/gtktreeselection.c:
Added missing GtkTreeSelection:mode property.
Closes bug #645960 "GtkTreeSelection has no property to set mode"
Duarte Loreto [Thu, 31 Mar 2011 22:19:39 +0000 (23:19 +0100)]
Updated Portuguese translation
Mario Blättermann [Thu, 31 Mar 2011 19:30:57 +0000 (21:30 +0200)]
[l10n] Updated German translation
Djavan Fagundes [Thu, 31 Mar 2011 14:42:31 +0000 (11:42 -0300)]
Updated Brazilian Portuguese translation
Mario Blättermann [Thu, 31 Mar 2011 07:41:05 +0000 (09:41 +0200)]
[l10n] Updated German translation
Alexander Shopov [Thu, 31 Mar 2011 03:36:40 +0000 (06:36 +0300)]
Updated Bulgarian translation
Miroslav Nikolić [Wed, 30 Mar 2011 23:11:14 +0000 (01:11 +0200)]
Updated Serbian translation
Daniel Korostil [Wed, 30 Mar 2011 14:54:43 +0000 (17:54 +0300)]
Uploaded Ukranian
Benjamin Otte [Wed, 30 Mar 2011 14:38:45 +0000 (16:38 +0200)]
widget: Propagate the right states to the widget when setting the parent
Benjamin Otte [Wed, 30 Mar 2011 14:15:21 +0000 (16:15 +0200)]
widget: Get rid of parent_sensitive flag
Instead rely on state_flags & GTK_STATE_FLAG_INSENSITIVE to tell us if a
widget is sensitive.
This has the huge benefit that the way the widget is actually rendered
corresponds to the return value of gtk_widget_is_sensitive().
As a side effect, we do not ever allow unsetting the
GTK_STATE_FLAG_INSENSITIVE for a widget the is set to not be sensitive
(via gtk_widget_set_sensitive()). This way we stop propagation of making
stuff sensitive at insensitive widgets.
https://bugzilla.gnome.org/show_bug.cgi?id=642918
Matthias Clasen [Wed, 30 Mar 2011 06:25:12 +0000 (02:25 -0400)]
Make GtkWidget::halign RTL-save
This commit makes GTK_ALIGN_START/_END pay attention to
the text direction when used in horizontal context.
This is how similar parameters in GtkMisc and GtkAlignment work,
and is generally expected of GTK+ positioning parameters. And this
is new GTK+ 3 api, so it is basically still unused at this point.
If explicit right/left turn out to be needed at some point, we
can expand the enumeration with new values.
Bruce Cowan [Wed, 30 Mar 2011 14:25:09 +0000 (15:25 +0100)]
Updated British English translation
Matthias Clasen [Wed, 30 Mar 2011 06:24:00 +0000 (02:24 -0400)]
GtkGrid: Add forgotten RTL flipping
How did we manage to add a non-RTL savy container in GTK+ 3.0 ?
Benjamin Otte [Wed, 30 Mar 2011 11:14:47 +0000 (13:14 +0200)]
label: Remove dead code
This code has been useless for a while, and now it's breaking things.
Moving the paned in tests/testheightforwidth's wrapping label shows that
bug.
Broken since
9992efdb0e7d0cf52e47817fe049b97967400731
Ask H. Larsen [Tue, 29 Mar 2011 21:41:18 +0000 (23:41 +0200)]
Updated Danish translation
Ask H. Larsen [Tue, 29 Mar 2011 21:39:16 +0000 (23:39 +0200)]
Updated Danish translation
Ryan Lortie [Tue, 29 Mar 2011 18:14:21 +0000 (23:44 +0530)]
GtkStatusIcon: support fixed-sized icons
Use the _NET_SYSTEM_TRAY_ICON_SIZE property set by the tray mananger as
a hint that we should use a specific icon size. This allows the tray to
instruct us that it expects 16x16 icons, for example.
Bug #645232
Carlos Garnacho [Mon, 28 Mar 2011 22:59:49 +0000 (00:59 +0200)]
theming: Implement non-uniform border-width in the theming engine.
The border-width CSS parameter takes up to 4 values, but it was
being ignored by the theming engine until now.
Carlos Garnacho [Mon, 28 Mar 2011 17:34:40 +0000 (19:34 +0200)]
theming: Avoid boxed struct copies throughout the default engine
Benjamin Otte [Tue, 29 Mar 2011 11:33:47 +0000 (13:33 +0200)]
label: Add another special case for measuring
Benjamin Otte [Tue, 29 Mar 2011 11:24:34 +0000 (13:24 +0200)]
label: Don't create the layout in size_allocate() if not needed
Just update its size if it already exists.
Benjamin Otte [Tue, 29 Mar 2011 11:21:48 +0000 (13:21 +0200)]
label: Move ellipsized layout width computation
... from size_allocate() to update_layout_width().
Benjamin Otte [Tue, 29 Mar 2011 13:12:30 +0000 (15:12 +0200)]
label: Factor out layout size measuring into its own function
Instead of doing half of it in get_preferred_size() and the other half
in get_label_width(), put it all in one place.
Benjamin Otte [Tue, 29 Mar 2011 13:05:27 +0000 (15:05 +0200)]
label: Move function to a better location
This patch does not change anything, it just moves the get_label_width
function.
Benjamin Otte [Tue, 29 Mar 2011 11:10:43 +0000 (13:10 +0200)]
label: Factor out layout size setting into a separate function
Benjamin Otte [Tue, 29 Mar 2011 01:31:09 +0000 (03:31 +0200)]
label: Only get font metrics if we have to
Getting these metrics is expensive, so avoid it if possible.
Benjamin Otte [Tue, 29 Mar 2011 01:16:34 +0000 (03:16 +0200)]
label: Add optimization for a common special case
Oftentimes we want to measure a layout that is as wide or wider than the
current layout's maximal width. In that case we can safely reuse the
current layout.
Benjamin Otte [Tue, 29 Mar 2011 00:53:28 +0000 (02:53 +0200)]
label: Remove unused boolean argument from ensure_layout()
It's always FALSE.
Note that this patch changes the layout for allocations that are
smaller than 1px, but that's just the default layout that is never
rendered.
Benjamin Otte [Tue, 29 Mar 2011 00:49:19 +0000 (02:49 +0200)]
label: Don't recreate the layout just for measuring
Instead, create a custom one.
Benjamin Otte [Tue, 29 Mar 2011 00:27:26 +0000 (02:27 +0200)]
label: Add internal gtk_label_get_measuring_layout() and use it
Avoids useless pango_layout_copy() calls and invalidations of an
existing layout when measuring sizes for a given label.
Benjamin Otte [Tue, 29 Mar 2011 13:26:03 +0000 (15:26 +0200)]
tests: Make test_init() not check for gdk-pixbuf anymore
gdk-pixbuf is system-installed these days.
Benjamin Otte [Tue, 29 Mar 2011 11:55:06 +0000 (13:55 +0200)]
progressbar: remove needless is_drawable() check before queue_resize()
Benjamin Otte [Tue, 29 Mar 2011 00:27:16 +0000 (02:27 +0200)]
tracker: Include gdk.h
Aron Xu [Tue, 29 Mar 2011 11:02:06 +0000 (11:02 +0000)]
Update Simplified Chinese po-properties translation.
Aron Xu [Tue, 29 Mar 2011 10:52:13 +0000 (10:52 +0000)]
Revert "Update Simplified Chinese translation." it commits po-properties translations to po.
This reverts commit
bd058d4ba36a166776c88cae9a2a541dae5decca.
Aron Xu [Tue, 29 Mar 2011 10:48:33 +0000 (10:48 +0000)]
Update Simplified Chinese translation.
Benjamin Otte [Mon, 28 Mar 2011 13:03:38 +0000 (14:03 +0100)]
docs: Update the drawing model description for GTK 3
https://bugzilla.gnome.org/show_bug.cgi?id=645937
Benjamin Otte [Mon, 28 Mar 2011 21:54:00 +0000 (23:54 +0200)]
docs: Fixes for icon renaming
Fixes up breakage from
39d4207ab7ecedc0fce2e65478dbd5d152e23b65
Alexander Larsson [Fri, 25 Mar 2011 09:53:05 +0000 (10:53 +0100)]
Ensure we always grab the gdk lock in async callbacks
Async callbacks are delivered in idles, so we need to make sure
we get the gdk lock before calling any gdk/gtk stuff. This was
missing in a few places.
Abduxukur Abdurixit [Sun, 27 Mar 2011 19:24:20 +0000 (21:24 +0200)]
Added UG translation
Michael Natterer [Sun, 27 Mar 2011 13:43:31 +0000 (15:43 +0200)]
gtk: add "Since: 3.2" to gtk_widget_path_to_string()
Yuri Kozlov [Sun, 27 Mar 2011 10:27:45 +0000 (14:27 +0400)]
Updated Russian translation
Yuri Myasoedov [Sun, 27 Mar 2011 10:25:19 +0000 (14:25 +0400)]
Revert "Updated Russian translation"
This reverts commit
e082ac5ab5cdb9d3fb16b5e69819b34ebb30fe6a.
Yuri Kozlov [Sun, 27 Mar 2011 10:23:01 +0000 (14:23 +0400)]
Updated Russian translation
Benjamin Otte [Sun, 27 Mar 2011 01:43:07 +0000 (03:43 +0200)]
widget: Only reemit style-set signal after gtk_widget_get_style()
If the widget does not care about the compat code, just ignore it.
Benjamin Otte [Sun, 27 Mar 2011 01:39:43 +0000 (03:39 +0200)]
widget: Don't invalidate style context in its invalidate callback
Benjamin Otte [Sun, 27 Mar 2011 00:53:04 +0000 (01:53 +0100)]
widget: Update path unconditionally in gtk_widget_reset_style()
Also, don't set the new path twice on the style context.
Benjamin Otte [Sun, 27 Mar 2011 00:52:16 +0000 (01:52 +0100)]
widget: Don't duplicate style context updates
The screen changes are done in do_screen_change(), the widget path is
updated in gtk_widget_reset_style().
Benjamin Otte [Sun, 27 Mar 2011 00:51:20 +0000 (01:51 +0100)]
widget: Call the non-deprecated function
Both functions are identical, just that one isn't deprecated.
Benjamin Otte [Sat, 26 Mar 2011 13:29:32 +0000 (14:29 +0100)]
API: Add gtk_widget_path_to_string()
Dumps the widget path into a string representation. It tries to match the CSS
style as closely as possible (Note that there might be paths that cannot be
represented in CSS).
The main use of this code is for debugging purposes, so that you can
g_print() the path or dump it in a gdb session.
Benjamin Otte [Sat, 26 Mar 2011 22:34:45 +0000 (23:34 +0100)]
widget: Emit initial style-set signal in the same situations as GTK2
This ensures that widgets that aren't ported and rely on the style-set
signal being emitted work as well as before. They should not rely on
style-set being emitted however.
Note that this function is a no-op if the initial style has been set
already and is very cheap if it has not been set yet. It only becomes
relevant if the resulting style actually gets used.
https://bugzilla.gnome.org/show_bug.cgi?id=639584
Benjamin Otte [Sat, 26 Mar 2011 22:33:39 +0000 (23:33 +0100)]
widget: Create the widget's style lazily
That way we don't have to update the style's colors all the time on
theme changes when the widget is not actually using GtkStyle.
Benjamin Otte [Sat, 26 Mar 2011 20:55:35 +0000 (21:55 +0100)]
widget: Don't call gtk_style_attach() and gtk_style_detach() anymore
Benjamin Otte [Sat, 26 Mar 2011 20:46:50 +0000 (21:46 +0100)]
docs: Make clear that gtk_widget_set_style() does not do anything
Benjamin Otte [Sat, 26 Mar 2011 20:45:32 +0000 (21:45 +0100)]
widget: Use a priv variable
Benjamin Otte [Sat, 26 Mar 2011 20:42:41 +0000 (21:42 +0100)]
widget: Widgets always have a style, so no need to check for NULL
Benjamin Otte [Sat, 26 Mar 2011 18:22:31 +0000 (19:22 +0100)]
combobox: Don't set the menu's name twice
Benjamin Otte [Sat, 26 Mar 2011 16:00:36 +0000 (17:00 +0100)]
notebook: Only reset style on tab labels when it actually changes
Benjamin Otte [Sat, 26 Mar 2011 15:07:54 +0000 (16:07 +0100)]
widget: Reshuffle code for style context getter
The intention of this patch is to make the code clearer, shorter and
most of all to avoid recreating the widget path and setting it path
twice on the style context when the style context was recreated.
Benjamin Otte [Sat, 26 Mar 2011 14:22:11 +0000 (15:22 +0100)]
widget: Don't create the style context if not necessary
If all we want to do is update the context's screen, we don't need to
create it if it doesn't exist yet.
Benjamin Otte [Sat, 26 Mar 2011 22:52:28 +0000 (23:52 +0100)]
Revert "Ensure GtkWidget::style-updated is emitted before first size negociation"
This reverts commit
b7f772eb93e8615ebf14f5bdde33bc59dd0b11bf.
The commit just poked around things and added lots of workarounds
instead of actually fixing the bug it set out to fix.
See https://bugzilla.gnome.org/show_bug.cgi?id=639584 for details.
Benjamin Otte [Sat, 26 Mar 2011 13:49:24 +0000 (14:49 +0100)]
gtk: Reset children styles when changing name
Changing the name of a widget does not just change the current widget's
path, but also the path of all its children.
Benjamin Otte [Sat, 26 Mar 2011 13:44:12 +0000 (14:44 +0100)]
widgetpath: Sanitize pos argument for iters correctly
The comparison done was off by one and would have caused invalid
reads or writes.
Benjamin Otte [Sat, 19 Feb 2011 19:45:54 +0000 (20:45 +0100)]
dnd: Use G_N_ELEMENTS()
Now that we have wesome macros in glib 2.0, we can use them. Woohoo, GTK
2.0 will be so awesome in the future.
(Did anybody touch dnd code this millenium?)
Claude Paroz [Sat, 26 Mar 2011 16:14:41 +0000 (17:14 +0100)]
Updated French translation of po-properties
Contributed by Gérard Baylard, Bruno Brouard and Claude Paroz
Daniel Nylander [Sat, 26 Mar 2011 09:29:53 +0000 (10:29 +0100)]
Updated Swedish translation
Chun-wei Fan [Sat, 26 Mar 2011 03:49:53 +0000 (11:49 +0800)]
Update VS property sheet
Make GDK-Pixbuf include path more consitent with autofiscated builds
Tristan Van Berkom [Sun, 6 Mar 2011 08:13:32 +0000 (17:13 +0900)]
Fixed possible segmentation fault while freeing size request caches.
Tristan Van Berkom [Sun, 6 Mar 2011 06:13:56 +0000 (15:13 +0900)]
Cache heights-for-range-of-widths instead of height for every width.
This patch optimizes window resizes by assuming that if a widget
has the same height at a width of 50 as with a width of 150, the
height for width 100 will also be the same.
The patch also further optimizes the cache allocator, now there
are 2 pointer arrays of up to a maximum of 5 requests, the arrays
will only be allocated if a request is ever made in that orientation
and the array will be sparse until each request is made (i.e. if a
label can only wrap to 3 lines, there will only be 3 out of a
possible 5 SizeRequest structures allocated to cache it).
Tristan Van Berkom [Sat, 5 Mar 2011 10:29:10 +0000 (19:29 +0900)]
Reduce memory consumption of the size request cache.
This patch makes contextual height-for-width request caching
optional (the contextual cache is not allocated for widgets that
report GTK_SIZE_REQUEST_CONSTANT_SIZE).
Tristan Van Berkom [Sat, 5 Mar 2011 08:49:49 +0000 (17:49 +0900)]
Added GTK_SIZE_REQUEST_CONSTANT_SIZE to GtkSizeRequestMode
The constant size request mode defines a request mode where
height-for-width geometry is unneeded, thus optimizing GTK+
by reducing the overall amount of requests that need to be
performed and cached while resizing an interface.
Daniel Nylander [Fri, 25 Mar 2011 21:30:29 +0000 (22:30 +0100)]
Updated Swedish translation
Alexander Shopov [Fri, 25 Mar 2011 20:28:19 +0000 (22:28 +0200)]
Updated Bulgarian translation
Florian Müllner [Fri, 25 Mar 2011 14:46:41 +0000 (15:46 +0100)]
window: Use settings from screen rather than default
gtk_settings_get_default() was used to monitor the
"gtk-application-prefers-dark-theme" setting, rather
than the GtkSettings object associated with the window's
screen.
Carlos Garnacho [Thu, 24 Mar 2011 23:31:46 +0000 (00:31 +0100)]
Ensure GtkWidget::style-updated is emitted before first size negociation
Fixes Bug 639584 - initial emission of GtkWidget:style-set is
not happening.
GtkWidget was filtering out ::style-updated (and ::style-set)
emissions until the widget was realized in order to avoid often
useless updates during widget construction and placing.
This is now done instead until the widget has a parent/screen,
which ensures the initial emission happen prior to the first
size negociation, while still filtering out all early emissions
during construction.
Changwoo Ryu [Fri, 25 Mar 2011 13:01:43 +0000 (22:01 +0900)]
Updated Korean translation
Friedel Wolff [Thu, 24 Mar 2011 21:13:33 +0000 (23:13 +0200)]
Update translation for Afrikaans (af)
Matthias Clasen [Thu, 24 Mar 2011 16:44:03 +0000 (12:44 -0400)]
Make selectable labels work again
You can select something, but moving the focus somewhere else, or bringing up
the context menu makes the selection go away. This makes it impossible to
copy-paste the text.
The reason for this regression is that gtk_label_state_changed was sloppy and
assumed that it would only ever be called when a labels goes insensitive, which
is no longer the case.
The patch fixes things by explicitly checking if the widget is insensitive, and
only resetting the selection in that case, which is the same behaviour we have
for e.g. GtkEntry.
Aron Xu [Thu, 24 Mar 2011 16:36:19 +0000 (16:36 +0000)]
Merge Simplified Chinese translation from branch gtk-3-0.
Cosimo Cecchi [Tue, 22 Mar 2011 18:53:21 +0000 (14:53 -0400)]
switch: hardcode a smaller font size for the switch label
This should not really be done here, but we can't override font size
from the theme just yet.
https://bugzilla.gnome.org/show_bug.cgi?id=645458
Cosimo Cecchi [Tue, 22 Mar 2011 18:51:06 +0000 (14:51 -0400)]
gtksettings: unset attributes set to normal from font description
So that they do not override values coming from the theme.
Based on a patch by Carlos Garnacho.
https://bugzilla.gnome.org/show_bug.cgi?id=645458
Cosimo Cecchi [Tue, 22 Mar 2011 18:35:23 +0000 (14:35 -0400)]
Revert "styleproperties: don't force replacing the font description"
It turns out the bug is more complicated than I originally understood.
Not replacing the font description fields while merging here makes it
impossible for application's CSS to override fonts.
This reverts commit
89c1d93b68aaaebeb5db0dc2a58895721c6665aa.
https://bugzilla.gnome.org/show_bug.cgi?id=645458
Olav Vitters [Wed, 23 Mar 2011 10:54:36 +0000 (11:54 +0100)]
Add DOAP file
Carlos Garcia Campos [Tue, 22 Mar 2011 11:47:50 +0000 (12:47 +0100)]
gtk-demo: Add placeholder text to search entry demo
Michael Natterer [Mon, 21 Mar 2011 19:58:40 +0000 (20:58 +0100)]
configure: bump version to 3.1.0
Michael Natterer [Mon, 21 Mar 2011 19:57:43 +0000 (20:57 +0100)]
Bug 643805 - Allow GtkExpander to resize the toplevel upon expanding/collpasing
Add gtk_expander_get,set_resize_toplevel() and a "resize-toplevel"
property.
Marek Kasik [Fri, 19 Nov 2010 09:55:25 +0000 (10:55 +0100)]
Check whether a resolution has been set in GtkPrintSettings
If resolution has not been set then use default resolution from ppd.
https://bugzilla.gnome.org/show_bug.cgi?id=635254
Cosimo Cecchi [Mon, 21 Mar 2011 14:53:12 +0000 (10:53 -0400)]
themingengine: don't hardcode white to draw insensitive labels shadow
Use the background color instead.
I think the optimal solution would be delegating the shadow rendering to
the theme completely, and removing this in GtkThemingEngine, but for
now, this simple fix makes the dark variant more usable.
https://bugzilla.gnome.org/show_bug.cgi?id=645405